import service from "@/utils/request.js";

/**
 * @name 项目列表-分页
 * @param {*} data
 * @returns
 */
export const getPageProjects = (data) => {
  return service({
    url: "/jy-business/project/getPageProjects",
    method: "post",
    data,
  });
};

/**
 * @name  产品列表-分页
 * @param {*} data
 * @returns
 */
export const getPageProducts = (data) => {
  return service({
    url: "/jy-business/products/getPageProducts",
    method: "post",
    data,
  });
};

/**
 * @name  诊断配置
 * @param {*} data
 * @returns
 */
export const getDiagnosis = () => {
  return service({
    url: "/jy-business/diagnosis/config/query",
    method: "get"
  });
};

/**
 * @name 新增疗程
 * @param {*} data 
 * @returns 
 */
export const saveCourse = (data)=>{
  return service({
    url: "/jy-business/course/save",
    method: "post",
    data
  });
}

/**
 * @name 获取疗程列表
 * @param {*} data 
 * @returns 
 */
export const getPageCourse = (data)=>{
  return service({
    url: "/jy-business/course/getPageCourse",
    method: "post",
    data
  });
}

/**
 * @name 疗程详情
 * @param {*} id 
 * @returns 
 */
export const selectCourseDetail = (id)=>{
  return service({
    url: "/jy-business/course/selectCourseDetail",
    method: "get",
    params:{
      id
    }
  });
}

